import React, { Component } from 'react'
import Select from 'react-select'
import './style'

export default class MySelect extends React.Component {

    constructor(props) {
        super(props);
    }

    innerOnChange = (selectedOption) => {
        this.props.onChange && this.props.onChange(selectedOption, this.props)
    }

    render() {
        var { onChange, ...rest } = this.props;
        return <Select className="m-select" onChange={this.innerOnChange}  {...rest} />
    }

}
